package com.feihao.zhou.ThreadSave;

public class ThreadMainTest {
    public static void main(String[] args) {
        //创建卖票对象
        Ticket t = new Ticket();


        //将买票对象传给Thread类，创建线程对象。
        Thread thread1 = new Thread(t,"窗口1");
        Thread thread2 = new Thread(t,"窗口2");
        Thread thread3 = new Thread(t,"窗口3");

        //开启卖票线程：

        thread1.start();
        thread2.start();
        thread3.start();

    }
}
